package cn.kgm.log.filter;

import com.alibaba.fastjson2.filter.SimplePropertyPreFilter;
import lombok.NoArgsConstructor;

import java.util.Arrays;

/**
 * 排除JSON敏感属性
 *
 * @kapi #技术改变自己#
 * @AUTHOR: ruoyi
 * @EMAIL: yolo.jk@qq.com
 * @DATE: 2023/4/25 11:29 周二
 */
@NoArgsConstructor
public class PropertyPreExcludeFilter extends SimplePropertyPreFilter
{
    public PropertyPreExcludeFilter addExcludes(String... filters)
    {
        Arrays.stream(filters).forEach(this.getExcludes()::add);
        return this;
    }
}
